import { axios } from '@/utils/request'
import baseapi from '@/api/base'

const api = {
  imgUploadUrlPath: '/fileupload/img/'
  // fileUploadUrlPath: '/fileupload/doc/',
  // imgShowUrl: '',
  // docReadUrl: '/fileupload/img/?url='
  // orgInfo: '/'
}

export default api

// 单图片上传
export function imgUpload (parameters, headers) {
  const allheaders = {
    appId: baseapi.huiwcore_app
  }
  // console.log(baseapi.imgUploadUrl + baseapi.uploadfile + api.imgUploadUrlPath)
  return axios({
    url: baseapi.imgUploadUrl + baseapi.uploadfile + api.imgUploadUrlPath,
    method: 'post',
    headers: Object.assign(headers, allheaders),
    data: parameters
  })
}
